package com.amani.services;

import java.util.List;
import java.util.Map;

import javax.jws.WebMethod;
import javax.jws.WebResult;
import javax.jws.WebService;

import com.amani.bean.Account;
import com.amani.bean.SpadDconsumeInfo;
import com.amani.bean.SpadMconsumeInfo;
import com.amani.model.Cardinfo;
import com.amani.model.CategoryinfoId;
import com.amani.model.Companyinfo;
import com.amani.model.Designer;
import com.amani.model.Evaluation;
import com.amani.model.Goodsinfo;
import com.amani.model.Nointernalcardinfo;
import com.amani.model.Project;
import com.amani.model.Projectinfo;
import com.amani.model.Roominfo;
import com.amani.model.StaffHairDesignerInfo;
import com.amani.model.Staffinfo;
import com.amani.model.VirtualCard;
import com.amani.model.Vouchersdetal;
import com.amani.model.Works;
import com.amani.model.Wxbandcard;


@WebService
public interface ICommonService {
		@WebMethod(operationName="updtaeCardCodeState")//跟新carddecode的状态，0:未发放  1：已发放  2:已发放，但未领取  
		@WebResult(name = "result")
		public boolean updtaeCardCodeState(String cardCode,int state);
	
		@WebMethod(operationName="updtaeOrderStateByCardCode")//订单状态，通过cardCode
		@WebResult(name = "result")
		public boolean updtaeOrderStateByCardCode(String cardCode,int orderState);
	
		@WebMethod(operationName="updtaeOrderCard")//更新cardCode
		@WebResult(name = "result")
		public boolean updtaeOrderCard(String orderno,String cardId,String cardCode);
	
		@WebMethod(operationName="updtaeOrderStateByOrderNo")//更新订单状态
		@WebResult(name = "result")
		public boolean updtaeOrderStateByOrderNo(String orderno,String OrderType,int orderState);
		
		@WebMethod(operationName="getOrderStateByOrderNo")//更新订单状态
		@WebResult(name = "result")
		public int getOrderStateByOrderNo(String orderno,String OrderType);
	
		@WebMethod(operationName="getCardcode")//获取一个可用券号
		@WebResult(name = "result")
		public String getCardcode(String cardId);
		
		@WebMethod(operationName="getNewsListByCid")//获取新闻活动列表
		@WebResult(name = "result")
		public  List<Map<String, Object>> getNewsListByCid( String cid);
		
		@WebMethod(operationName="getNewsById")//获取新闻活动
		@WebResult(name = "result")
		public Map<String, Object> getNewsById( String id); 

		@WebMethod(operationName="loadWxOrderByOrderNo")//加载wx订单
		@WebResult(name = "result")
		public Map<String, Object> loadWxOrderByOrderNo(String orderno);
	
	
		@WebMethod(operationName="saveWxOrderStep1")//保存微信订单数据第一步
		@WebResult(name = "result")
		public int saveWxOrderStep1(boolean isExpress,String orderno,double price,String openid,String memberno, String address,String username,String phone,String compno,String compname,String companyaddress);
		
		@WebMethod(operationName="saveWxOrderStep2")//保存微信订单数据第二步
		@WebResult(name = "result")
		public void saveWxOrderStep2(int parentId, int produectId,int number);
	
		@WebMethod(operationName="loadProductDescription")//加载商品描述信息
		@WebResult(name = "result")
		public List<Map<String, Object>> loadProductDescription(String produectId);
		
		@WebMethod(operationName="loadProductInfo")//加载商品信息
		@WebResult(name = "result")
		public List<Map<String, Object>> loadProductInfo(String produectId);
	
	
		@WebMethod(operationName="loadProductsByGroupId")//加载商品分类下的商品信息
		@WebResult(name = "result")
		public List<Map<String, Object>> loadProductsByGroupId(String goupId);

		@WebMethod(operationName="loadProductGroup")//加载商品分类
		@WebResult(name = "result")
		public List<Map<String, Object>> loadProductGroup();
 
		@WebMethod(operationName="loadHotProducts")//获取热门商品
		@WebResult(name = "result")
		public List<Map<String, Object>> loadHotProducts();

		@WebMethod(operationName="loadConsumedStaffinfos")//获取指定openid预约过的设计师
		@WebResult(name = "result")
		public List<Map<String, Object>>  loadConsumedStaffinfos(String openid,String projecttype);
		
		@WebMethod(operationName="loadStaffinfosByCompno")//获取门面的前N位员工
		@WebResult(name = "result")
		public List<Map<String, Object>>  loadStaffinfosByCompno(String compno,String projecttype,int n);
		
		@WebMethod(operationName="loadMemberinfoByOpenid")//根据openid获取会员卡信息
		@WebResult(name = "result")
		public List<Map<String, Object>>  loadMemberinfoByOpenid(String openid);
		
		@WebMethod(operationName="loadNearbyStaffinfos")//获取指定openid附近门店的设计师
		@WebResult(name = "result")
		public  List<Staffinfo> loadNearbyStaffinfos(double lon, double lat,
				int projecttype);
		
		@WebMethod(operationName="loadCompanyinfo")	//获取单个门店的所有信息
		@WebResult(name = "result")
		public Companyinfo loadCompanyinfo(String strCompId);
		
		
		@WebMethod(operationName="loadAllCompanyinfo")	//获取所有的门店信息所有信息
		@WebResult(name = "result")
		public List<Companyinfo> loadAllCompanyinfo();
		
		
		@WebMethod(operationName="loadProjectinfo")	//获取单个门店的项目信息
		@WebResult(name = "result")
		public List<Projectinfo> loadProjectinfo(String strCompId);
		
		
		@WebMethod(operationName="loadAllGoodinfo")	//获取所有门店的产品信息
		@WebResult(name = "result")
		public List<Goodsinfo> loadAllGoodinfo();
		
		
		@WebMethod(operationName="loadStaffinfo")	//获取单个门店的员工信息
		@WebResult(name = "result")
		public String loadStaffinfo(String strCompId,String itemNo);
		
		
		@WebMethod(operationName="loadCategory")	//获取单个门店的排班信息
		@WebResult(name = "result")
		public List<CategoryinfoId> loadCategory(String strCompId);
		
		@WebMethod(operationName="loadRoomInfo")	//获取单个门店的房间信息
		@WebResult(name = "result")
		public List<Roominfo> loadRoomInfo(String strCompId);
		
		@WebMethod(operationName="loadMirror")	//获取单个门店的镜台信息
		@WebResult(name = "result")
		public List<String> loadMirror(String strCompId);
		
		@WebMethod(operationName="loadCardInfos")	//获取会员信息
		@WebResult(name = "result")
		public List<Cardinfo> loadCardInfos(String strPhone,String strCardNo);
		
		@WebMethod(operationName="loadCardInfo")//获取单个会员卡信息
		@WebResult(name = "result")
		public Cardinfo loadCardInfo(String strCompId,String strCardNo);
		
		@WebMethod(operationName="saveIPADBillInfo")//保存开单信息
		@WebResult(name = "result")
		public boolean saveIPADBillInfo(SpadMconsumeInfo spadMconsumeInfo,List<SpadDconsumeInfo> spadDconsumeInfo);
		
		@WebMethod(operationName="loadVouchers")//保存开单信息
		@WebResult(name = "result")
		public String loadVouchers();
		
		@WebMethod(operationName="loadDqyNo")//保存开单信息
		@WebResult(name = "result")
		public String loadDqyNo(String strOpenId,String strClientName,String strMobile,String strVchNo,String strBillId);
		
		@WebMethod(operationName="loadCardAccount")//保存开单信息
		@WebResult(name = "result")
		public String loadCardAccount(String strCardNo);
		
		
		@WebMethod(operationName="loadCardproaccounts")//保存开单信息
		@WebResult(name = "result")
		public String loadCardproaccounts(String strCompId,String strCardNo);
		
		
		@WebMethod(operationName="loadcCardaccountchangehistories")//保存开单信息
		@WebResult(name = "result")
		public String loadcCardaccountchangehistories(String strCardNo);
		
		
		@WebMethod(operationName="updateCardPassword")//保存开单信息
		@WebResult(name = "result")
		public boolean updateCardPassword(String strCardNo,String strPassword);
		
		@WebMethod(operationName="checkCardPassword")//保存开单信息
		@WebResult(name = "result")
		public boolean checkCardPassword(String strCardNo,String strPassword);
		
		
		@WebMethod(operationName="loadVouchersdetalsById")//保存开单信息
		@WebResult(name = "result")
		public List<Vouchersdetal> loadVouchersdetalsById(String strVchNo);
		
		@WebMethod(operationName="loadWxbandcard")//保存开单信息
		@WebResult(name = "result")
		public Wxbandcard loadWxbandcard(String strCardNo,String strOperId);
		
		@WebMethod(operationName="checkDyqNo")//保存开单信息
		@WebResult(name = "result")
		public boolean checkDyqNo(String strDyqNo);
		
		@WebMethod(operationName="lsDnointernalcardinfos")//保存开单信息
		@WebResult(name = "result")
		public String lsDnointernalcardinfos(String strDyqNo);
		
		@WebMethod(operationName="loadNointernalcardinfo")//保存开单信息
		@WebResult(name = "result")
		public Nointernalcardinfo loadNointernalcardinfo(String strDyqNo);
		
		@WebMethod(operationName="loadwWeixinclents")//保存开单信息
		@WebResult(name = "result")
		public String loadwWeixinclents(String strOperId);
		
		
		@WebMethod(operationName="wxPost")//保存开单信息
		@WebResult(name = "result")
		public boolean wxPost(String strCompId,String strBillId, String strDate);
		
		
		@WebMethod(operationName="saveEvaluations")//保存开单信息
		@WebResult(name = "result")
		public boolean saveEvaluation(String billid,String operid,double discount,String content,double amt);
		
		
		@WebMethod(operationName="loadEvaluation")//保存开单信息
		@WebResult(name = "result")
		public Evaluation loadEvaluation(String operid,String billid);
		
		@WebMethod(operationName="saveOrders")//保存预约主档
		@WebResult(name = "result")
		public boolean saveOrders(String strCompId,String strBillId,String strCardNo,String orderPhone,String strDate,String strTime,String openid,int billType,String complydetail);
		
		@WebMethod(operationName="saveOrderPrjInfo")//保存预约主档
		@WebResult(name = "result")
		public boolean saveOrderPrjInfo(String strCompId,String strBillId,String strPrjInfo,String strPrjName);
		
		@WebMethod(operationName="saveOrderEmpInfo")//保存预约主档
		@WebResult(name = "result")
		public boolean saveOrderEmpInfo(String strCompId,String strBillId,String strEmpNo,String strEmpName,String strEmpInid);
		
		@WebMethod(operationName="loadOrders")//查询预约
		@WebResult(name = "result")
		public String loadOrders(String openid);
		
		@WebMethod(operationName="loadCompByCardNo")//查询推荐店面
		@WebResult(name = "result")
		public String loadCompByCardNo(String strCardNo);
		
		@WebMethod(operationName="loadEmpInfoByComp")//查询推荐员工
		@WebResult(name = "result")
		public String loadEmpInfoByComp(String strCompId,String strCardNo);
		
		@WebMethod(operationName="loadEmpInfoByDept")//查询店面所有的美容师和美发师
		@WebResult(name = "result")
		public String loadEmpInfoByDept(String strCompId);
		
		@WebMethod(operationName="updBillState")//单据作废
		@WebResult(name = "result")
		public boolean updBillState(String strCompId,String strBillId);
		
		@WebMethod(operationName="updOrderState")//修改单据状态
		@WebResult(name = "result")
		public boolean updOrderState(String strBillId);
		
		@WebMethod(operationName="checkBillState")//查询单据状态
		@WebResult(name = "result")
		public String checkBillState(String strBillId);
		
		//绑定员工的OPID
		@WebMethod(operationName="bandStaffInfo")//修改单据状态
		public boolean bandStaffInfo(String strParams);
		
		//保存预约主档
		@WebMethod(operationName="saveNewOrders")
		public String saveNewOrders(String strCompId,String strBillId,String strItemNo,String strEmpNo,int ispz,String strDate,String strTime,String orderPhone,String strCardNo,String openid,String strEmpName);
		
		//查询预约
		@WebMethod(operationName="loadOrderDetal")
		public String loadOrderDetal(String openid);
		
		//根据预约单号查询预约
		@WebMethod(operationName="loadOrderById")
		public String loadOrderById(String callbillid);
		
		//根据员工工号查询预约
		@WebMethod(operationName="loadOrderByEmp")
		public String loadOrderByEmp(String strCompId,String strEmpNo, String orderDate, String orderTime);
		
		//根据OpenId查询预约
		@WebMethod(operationName="loadOrderByOpenId")
		public String loadOrderByOpenId(String openId, String orderDate, String orderTime);
		
		//推荐员工
		@WebMethod(operationName="loadNewEmpInfoByComp")
		public String loadNewEmpInfoByComp(String strCompId,String strCardNo,int billtype);
		
		/**
		 * 推荐明星发型师
		 * @param strCompId
		 * @return
		 */
		public String loadStartHairInfo(String strCompId);
		
		/**
		 * 推荐明星美容师
		 * @param strCompId
		 * @return
		 */
		public String loadStartBeautyInfo(String strCompId);
		
		
		/**
		 * 检查用户名密码
		 * @param userName
		 * @param pwd
		 * @return
		 */
		public String checkUser(String strCompId,String userName,String pwd);
		
		/**
		 * 保存盘点信息
		 * @param inventory
		 * @param lsInventorydetals
		 * @return
		 */
		public String saveInventory(String strCompId,String userId,String strParams);
		
		/**
		 * 增加盘点主档
		 * @param strCompId
		 * @return
		 */
		public String addInventory(String strCompId);
		
		/**
		 * 检查条形码的状态
		 * @param strCompId
		 * @param strGoodBar
		 * @return
		 */
		public String checkGoodBar(String strCompId,String strGoodBar);
		
		/**
		 * 删除盘点信息
		 * @param inventBill
		 * @return
		 */
		public String deleteInventoryByInventBill(String strCompId,String inventBill);
		
		/**
		 * 删除盘点信息
		 * @param inventBill
		 * @return
		 */
		public String deleteInventoryByBill(String strCompId,String bill);
		
		
		/**
		 * 查询条形码信息
		 * @param goodBarNo
		 * @return
		 */
		public String findGoodBarInfo(String goodBarNo);
		
		/**
		 * 根据产品id（wx_product.id），查询产品信息
		 * @param productId
		 * @return
		 */
		@WebMethod(operationName="loadWchatProduct")
		public Map<String, Object> loadWchatProduct(String productId);
		
		/**
		 * 根据产品id（wx_product.id），查询详细步骤数据
		 * @param productId
		 * @return
		 */
		@WebMethod(operationName="loadProductDetail")
		public List<Map<String,Object>> loadProductDetail(String productId);
		
		/**
		 * 根据产品id（wx_product.id），查询套餐数据
		 * @param productId
		 * @return
		 */
		@WebMethod(operationName="loadProductPackage")
		public List<Map<String,Object>> loadProductPackage(String productId);
		
		//到店首页美发作品数据获取
		@WebMethod(operationName="pageWorks")
		public List<Works> pageWorks(int begin,int end,double xcoordinate,double ycoordinate);
		
		//美发作品页面作品数据获取
		@WebMethod(operationName="loadWorks")
		public Works loadWorks(int id);
		
		//美发作品页面设计师数据获取
		@WebMethod(operationName="loadDesigner")
		public Designer loadDesigner(String staffopenid);
		//@WebMethod(operationName="loadStaffinfo")
		//public List<Map<String, Object>> loadStaffinfo1(String staffopenid);
		
		//美发作品页面设计师美发作品数据获取
		@WebMethod(operationName="pageWorksByDesigner")
		public List<Works> pageWorksByDesigner(int begin,int end,String staffopenid);
		
		//到店页面美容项目数据获取
		@WebMethod(operationName="loadAllProject")
		public List<Project> loadAllProject();
		
		//到店页面美容项目数据获取
		@WebMethod(operationName="loadProjectByType")
		public List<Project> loadProjectByType(String type);
		
		//绑定会员卡
		@WebMethod(operationName="bindingCard")
		public boolean bindingCard(String cardno,String name,String phone,String openid);
		
		//获得系统参数的值 
		@WebMethod(operationName="loadSysParam")
		public String loadSysParam(String strCompId,String strValue);
		
		//获取员工详细信息
		@WebMethod(operationName="findStaffinfoByOpenId")
		public Staffinfo findStaffinfoByOpenId(String openid);
		
		//保存发型信息
		@WebMethod(operationName="saveStaffHairDesignerInfo")
		public boolean saveStaffHairDesignerInfo(Integer id,String lx,String bq,String ms,String openid ,String imageUrl);
		//获取发型信息
		@WebMethod(operationName="loadStaffHairDesignerInfo")
		public List<StaffHairDesignerInfo> loadStaffHairDesignerInfo(String openid);
		
		//获取发型信息
		@WebMethod(operationName="findStaffHairDesignerInfo")
		public StaffHairDesignerInfo findStaffHairDesignerInfo(Integer id);
		
		//获取发型信息
		@WebMethod(operationName="updateStaffInfo")
		public boolean updateStaffInfo(String openid,String staffename,String imageurl);
		
		//保存虚拟卡
		@WebMethod(operationName="saveVirtualCard")
		public VirtualCard saveVirtualCard(String openId,String phone,int sex);
		
		//获取员工不可以休息时间
		@WebMethod(operationName="saveVirtualCard")
		public String getStaffWorkDay(String beign,String end,String openId);
		
		//保存员工休息时间
		@WebMethod(operationName="saveStaffRestDay")
		public boolean saveStaffRestDay(String openId,String date);
		
		//获取订单
		@WebMethod(operationName="getOrders")
		public String getOrders(String beign,String end,String openid);
		
		//查询会员账户绑定的卡号
		@WebMethod(operationName="loadAllCard")
		public String loadAllCard(String strCompId, String openId);
		
		//获取我的会员账户
		@WebMethod(operationName="loadCardInfobyOpenid")
		public Cardinfo loadCardInfobyOpenid(String strCompId, String openId, String strCardNo);
		
		//修改会员卡密码
		@WebMethod(operationName="changePassword")
		public boolean changePassword(String openId, String cardno, String password);
		
		//查询在线订单（家居/到店）
		@WebMethod(operationName="loadWxOrders")
		public List<Map<String, Object>> loadWxOrders(String openid, String catgory);
		
		//查询在积分和余额
		@WebMethod(operationName="loadWxOrders")
		public List<Account> loadAccount(String openid);
		
		@WebMethod(operationName="loadStaffInfoByNo")
		public Map<String, Object> loadStaffInfoNo(String staffNo);
		
		@WebMethod(operationName="saveNointernalcardinfo")
		public boolean saveNointernalcardinfo(String cardvesting,String cardno,int cardtype,float cardfaceamt,int carduseflag,
				int entrytype,int cardstate,String usedate,String useinproject,String oldvalidate,String lastvalidate,String enabledate,int uespassward,String cardpassward,int createtype,int createcardtype,String openid);
		
		@WebMethod(operationName="saveDnointernalcardinfo")
		public boolean saveDnointernalcardinfo(String cardvesting,String cardno,float seqno,String ineritemno,float entrycount,
				float usecount,float lastcount, float entryamt ,float useamt,float lastamt,String costbillno, String entryremark);
}
